<?php if (! defined('BASEPATH')) exit('No direct script access allowed');
class User extends Controller{
	//建立表映射
	var $controller= "user";
	
	function User(){
		parent::Controller();
		$this->load->model('crud');
		$this->load->model('display');
		$this->data = $this->display->data;
	}
	
	function index(){
		echo 'User';
	}
	/* 创建 */	
	function user_new($id = NULL)
	{		
		$this->data['mytitle'] = 'Add New User';			
		//加载视图 
		$this->display->dashboard($this->data);
		$this->crud->save($this->controller, $id,'no','user_new');	
	}
	function save($id){
		//$this->crud->save($this->controller, $id,'no'); 
	}
	function interim(){
		$this->data['mytitle'] = 'Edit User';			
		//加载视图 
		$this->display->dashboard($this->data);
		$this->crud->insert($this->controller, $_POST,'no','user_new');  
	}
	
	function user_manage(){
		
	}
	
	/* 删除 */
	function user_del($id=NULL){
		
	}
}
?>